﻿using UnityEngine;
using System.Collections;
using System;

public class DelayToInvoke : MonoBehaviour
{
    public static IEnumerator Invoke(Action action, float delaySeconds)
    {
        yield return new WaitForSeconds(delaySeconds);
        action();
    }

    public static IEnumerator InvokeNextFrame(Action action)
    {
        yield return new WaitForEndOfFrame();
        action();
    }
}

